package com.ruibang.glass.equipment.entity.device;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import com.teaming.cloud.framework2.common.tools.LocalDateTimeStringConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel
@TableName(value = "g_equipment_outbound_management")
/**
 * 出库管理
 */
public class OutBoundManagement extends BaseEntity implements Serializable {
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "备件名称")
    @ExcelProperty(value = {"备件名称"}, index = 1)
    private String sparePartsName;
    @ApiModelProperty(value = "型号")
    @ExcelProperty(value = {"型号"}, index = 2)
    private String model;
    @ExcelIgnore
    private String modelId;

    @ApiModelProperty(value = "出库数量")
    @ExcelProperty(value = {"出库数量"}, index = 3)
    private Integer outboundQuantity;
    @ApiModelProperty(value = "单位")
    @ExcelProperty(value = {"单位"}, index = 4)
    private String unit;
    @ExcelIgnore
    private String unitId;
    @ApiModelProperty(value = "仓库名称")
    @ExcelProperty(value = {"仓库名称"}, index = 5)
    private String warehouseName;
    @ExcelIgnore
    private String warehouseId;
    @ApiModelProperty(value = "货架号")
    @ExcelProperty(value = {"货架号"}, index = 6)
    private String shelfNumber;
    @ApiModelProperty(value = "申请人")
    @ExcelProperty(value = {"申请人"}, index = 7)
    private String applicant;
    @ApiModelProperty(value = "出库用途")
    @ExcelProperty(value = {"出库用途"}, index = 8)
    private String outboundPurpose;
    @ApiModelProperty(value = "出库时间")
    @ExcelProperty(value = {"出库时间"}, index = 9, converter = LocalDateTimeStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outboundTime;

    @ApiModelProperty(value = "id")
    @ExcelIgnore
    private String inventoryId;

    @ApiModelProperty(value = "申请人id")
    @ExcelIgnore
    private String applicantId;

    @ExcelIgnore
    @ApiModelProperty(value = "备件Id")
    private String sparePartsId;

    @ApiModelProperty(value = "备件编号")
    private String sparePartsNumber;

    @ApiModelProperty(value = "id")
    @ExcelIgnore
    @TableField(exist = false)
    private String inId;
    @ApiModelProperty(value = "是否删除(1：是 0：否)")
    @TableLogic
    private String isDelete;

}
